App({
  globalData: {
    login: 0,
    URL: 'http://94.191.103.37/YouE/',
    sUrl: 'http://94.191.103.37/YouE/my/',
    yUrl: 'http://94.191.103.37/YouE/',
    openid: '',//唯一标识
    phoneNO: '',//若用户填写手机号则存在这里
    menuNote: '',//若用户填写备注则存在这里
    
  },
  onLaunch: function () {
    var that = this
    wx.showLoading({ title: '准备会员信息', mask: true })
    wx.login({
      success: function (res) {
        console.log(res)
        /*wx.request({
          url: that.globalData.URL + 'openid.php',
          data: { code: res.code },
          success: function (res) {
            console.log(res)
            that.globalData.openid = res.data//返回openid，存入全局变量
            console.log('用户openid为' + that.globalData.openid);
            wx.showLoading({ title: '查询会员信息', mask: true })
            wx.request({
              url: that.globalData.URL + 'login.php',
              data: {
                openid: that.globalData.openid
              },
              success: function (res) {
                console.log('用户信息', res.data)
                if (res.data != null) { that.globalData.VIPdata = res.data }
                wx.hideLoading()
              }
            })
          }
        })*/
        wx.hideLoading()
      },
      fail: function (res) {
        wx.hideLoading()
        wx.showModal({
          title: '登录会员失败',
          content: '请检查网络状况或账号安全状况。您现在处于未登录状态。',
        })
      }
    })
  }

})

/*      {name:'测试测试',price:'50'},
      {name:'测ssc额试',price:'100'},*/